.class Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;
.super Landroid/webkit/WebChromeClient;
.source "OrmmaView.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "WebChromeClient"
.end annotation


# instance fields
.field private mCallback:Landroid/webkit/WebChromeClient$CustomViewCallback;

.field private mContentView:Landroid/widget/FrameLayout;

.field mVideoFrameLayout:Landroid/view/View;

.field private mVideoProgressView:Landroid/view/View;

.field mVideoView:Landroid/widget/VideoView;

.field final synthetic this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;


# direct methods
.method private constructor <init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;)V
    .locals 0
    .parameter

    .prologue
    .line 318
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-direct {p0}, Landroid/webkit/WebChromeClient;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 318
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;)V

    return-void
.end method

.method private getVideoView(Landroid/view/View;)Landroid/widget/VideoView;
    .locals 3
    .parameter "view"

    .prologue
    .line 369
    instance-of v2, p1, Landroid/widget/FrameLayout;

    if-eqz v2, :cond_0

    move-object v1, p1

    .line 370
    check-cast v1, Landroid/widget/FrameLayout;

    .line 371
    .local v1, frameLayout:Landroid/widget/FrameLayout;
    invoke-virtual {v1}, Landroid/widget/FrameLayout;->getFocusedChild()Landroid/view/View;

    move-result-object v0

    .line 372
    .local v0, childView:Landroid/view/View;
    if-eqz v0, :cond_0

    instance-of v2, v0, Landroid/widget/VideoView;

    if-eqz v2, :cond_0

    .line 373
    check-cast v0, Landroid/widget/VideoView;

    .line 376
    .end local v0           #childView:Landroid/view/View;
    .end local v1           #frameLayout:Landroid/widget/FrameLayout;
    :goto_0
    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method


# virtual methods
.method public getVideoLoadingProgressView()Landroid/view/View;
    .locals 7

    .prologue
    const/16 v6, 0x11

    const/4 v5, -0x2

    .line 381
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mVideoProgressView:Landroid/view/View;

    if-nez v3, :cond_0

    .line 382
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->getContext()Landroid/content/Context;

    move-result-object v1

    .line 383
    .local v1, context:Landroid/content/Context;
    new-instance v2, Landroid/widget/LinearLayout;

    invoke-direct {v2, v1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 384
    .local v2, layout:Landroid/widget/LinearLayout;
    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 385
    new-instance v3, Landroid/widget/FrameLayout$LayoutParams;

    invoke-direct {v3, v5, v5, v6}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 387
    new-instance v0, Landroid/widget/ProgressBar;

    const/4 v3, 0x0

    const v4, 0x101007a

    invoke-direct {v0, v1, v3, v4}, Landroid/widget/ProgressBar;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 388
    .local v0, bar:Landroid/widget/ProgressBar;
    new-instance v3, Landroid/widget/FrameLayout$LayoutParams;

    invoke-direct {v3, v5, v5, v6}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    invoke-virtual {v0, v3}, Landroid/widget/ProgressBar;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 390
    invoke-virtual {v2, v0}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 391
    invoke-virtual {v0}, Landroid/widget/ProgressBar;->willNotCacheDrawing()Z

    .line 392
    iput-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mVideoProgressView:Landroid/view/View;

    .line 394
    .end local v0           #bar:Landroid/widget/ProgressBar;
    .end local v1           #context:Landroid/content/Context;
    .end local v2           #layout:Landroid/widget/LinearLayout;
    :cond_0
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mVideoProgressView:Landroid/view/View;

    return-object v3
.end method

.method public onHideCustomView()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    .line 399
    sget-boolean v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->sHtmlVideoIsPlaying:Z

    if-eqz v0, :cond_0

    .line 400
    sput-boolean v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->sHtmlVideoIsPlaying:Z

    .line 401
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v0, v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->setVisibility(I)V

    .line 402
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mContentView:Landroid/widget/FrameLayout;

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mVideoFrameLayout:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->removeView(Landroid/view/View;)V

    .line 403
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mCallback:Landroid/webkit/WebChromeClient$CustomViewCallback;

    invoke-interface {v0}, Landroid/webkit/WebChromeClient$CustomViewCallback;->onCustomViewHidden()V

    .line 404
    invoke-static {}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->access$000()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    const-string v1, "OrmmaView"

    const-string v2, "Video hidden"

    new-array v3, v3, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 406
    :cond_0
    return-void
.end method

.method public onShowCustomView(Landroid/view/View;Landroid/webkit/WebChromeClient$CustomViewCallback;)V
    .locals 4
    .parameter "view"
    .parameter "callback"

    .prologue
    .line 346
    const/4 v1, 0x1

    sput-boolean v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->sHtmlVideoIsPlaying:Z

    .line 347
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mContentView:Landroid/widget/FrameLayout;

    if-nez v1, :cond_0

    .line 348
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->getRootView()Landroid/view/View;

    move-result-object v1

    const v2, 0x1020002

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/FrameLayout;

    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mContentView:Landroid/widget/FrameLayout;

    .line 350
    :cond_0
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mVideoFrameLayout:Landroid/view/View;

    .line 351
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mVideoFrameLayout:Landroid/view/View;

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->getVideoView(Landroid/view/View;)Landroid/widget/VideoView;

    move-result-object v1

    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mVideoView:Landroid/widget/VideoView;

    .line 352
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mVideoView:Landroid/widget/VideoView;

    if-eqz v1, :cond_1

    .line 353
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mVideoView:Landroid/widget/VideoView;

    new-instance v2, Lcom/burstly/lib/component/networkcomponent/burstly/NoSeekMediaController;

    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-direct {v2, v3}, Lcom/burstly/lib/component/networkcomponent/burstly/NoSeekMediaController;-><init>(Landroid/content/Context;)V

    invoke-virtual {v1, v2}, Landroid/widget/VideoView;->setMediaController(Landroid/widget/MediaController;)V

    .line 355
    :cond_1
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->this$0:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->setVisibility(I)V

    .line 356
    invoke-static {}, Lcom/burstly/lib/util/Utils;->getFillparentValue()I

    move-result v0

    .line 357
    .local v0, fillparentVal:I
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mContentView:Landroid/widget/FrameLayout;

    new-instance v2, Landroid/widget/FrameLayout$LayoutParams;

    const/16 v3, 0x11

    invoke-direct {v2, v0, v0, v3}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    invoke-virtual {v1, p1, v2}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 358
    iput-object p2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView$WebChromeClient;->mCallback:Landroid/webkit/WebChromeClient$CustomViewCallback;

    .line 359
    return-void
.end method
